import * as types from '../constants/actionTypes';
import initialState from '../../reducers/initialState';

export default function(state=initialState.messages, action)
{
    switch(action.type){
        case types.MESSAGE_CHANGE:
            return Object.assign({},state,{[action.messages.id]: action.messages.item});
        default:
            return state;
    }
}

// module.exports=session;
